package com.java.test2;

public class Vehicle {
	// 属性
	private String vehicleBrand;// 汽车品牌一旦被初始化后就不得修改，不能用final修饰，
								// 因为final修饰的引用数据类型地址不可改，但内容可改。
	private String vehicleColor;
	private Double vehicleSpeed;

	// 构造函数
	public Vehicle(String vehicleBrand, String vehicleColor, Double vehicleSpeed) {
		super();
		this.vehicleBrand = vehicleBrand;
		this.vehicleColor = vehicleColor;
		this.vehicleSpeed = vehicleSpeed;
	}

	public Vehicle() {
		super();
		vehicleBrand = "benz";
	}

	// 行为
	public void run() {
		System.out.println(vehicleColor + " " + vehicleBrand + " is running...   ");
	}
	// getter，setter方法

	public String getVehicleBrand() {
		return vehicleBrand;
	}

	public void setVehicleBrand(String vehicleBrand) {
		this.vehicleBrand = vehicleBrand;
	}

	public String getVehicleColor() {
		return vehicleColor;
	}

	public void setVehicleColor(String vehicleColor) {
		this.vehicleColor = vehicleColor;
	}

	public Double getVehicleSpeed() {
		return vehicleSpeed;
	}

	public void setVehicleSpeed(Double vehicleSpeed) {
		this.vehicleSpeed = vehicleSpeed;
	}

}
